﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DTO;
using BUS;

namespace WebSieuThi.ThuNgan.BanHangAjax
{
    public partial class chonhangmua : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            int id = int.Parse(Request.QueryString["id"].ToString());
            int soluong = int.Parse(Request.QueryString["soluong"].ToString());
            int idnv = int.Parse(Request.QueryString["idnv"].ToString());
            int idkhach = int.Parse(Request.QueryString["idkhach"].ToString());

            string str = "";

            HangHoa hh = new HangHoa();
            hh = HangHoaBUS.TimTheoId(id);
           

            str += "<tr><td>"+hh.MaHH+"</td>";
            str += "<td>"+soluong+"</td></tr>";

            str += "<input type=\"hidden\" value=\"" + id + "\" name=\"idhanghoa\" />";
            str += "<input type=\"hidden\" value=\"" + soluong + "\" name=\"soluonghangmua\" />";
            str += "<input type=\"hidden\" value=\"" + idnv + "\" name=\"idcuanhanvien\" />";
            str += "<input type=\"hidden\" value=\"" + idkhach + "\" name=\"idcuakhach\" />";
            str += "<input type=\"hidden\" value=\"" + hh.DonGia + "\" name=\"dongiamonhang\" />";

            Response.Write(str);
        }
    }
}
